﻿using System;
using System.Collections.Generic;
using System.Reflection;
using UnityEngine;

namespace ActionSystem.Core.Utils
{
    public static class UtilsInit
    {        
        public static void InitDefalutGameObjectPool(List<Type> poolItemTypes)
        {
            if(poolItemTypes!=null&&poolItemTypes.Count>0)
            {
                foreach(var type in poolItemTypes)
                {
                    if(type==null)
                    {
                        continue;
                    }
                    var t = type.GetCustomAttribute<PoolInitAttribute>();
                    PoolInitAttribute.InitPools(t);
                }
                
            }
            
        }
    }

}

